package com.emergency.db.domain.item;


import com.emergency.base.domain.BaseEntity;
import com.emergency.db.domain.item.Item;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.persistence.*;
import java.io.Serializable;


//设备明细详情类

@Entity
@Table(name = "bas_item_detail")
public class ItemDetail extends BaseEntity {

    private String itemUse;//设备用途

    private String saveStatus;//装备保存状态，枚举类 0.良好；1.有损坏；2.报废

    private Double useTime;//设备使用时间

    private String fun;//主要功能

    private String itemStatus;//设备状态，枚举类0.待命中；1.出勤中；2.整备中；3.维修中

    @JsonIgnore
    @OneToOne(targetEntity = Item.class, fetch = FetchType.LAZY)
    @JoinColumn(name = "item_id", referencedColumnName = "id")
    private Item item;

    public String getItemUse() {
        return itemUse;
    }

    public void setItemUse(String itemUse) {
        this.itemUse = itemUse;
    }

    public String getSaveStatus() {
        return saveStatus;
    }

    public void setSaveStatus(String saveStatus) {
        this.saveStatus = saveStatus;
    }

    public Double getUseTime() {
        return useTime;
    }

    public void setUseTime(Double useTime) {
        this.useTime = useTime;
    }

    public String getFun() {
        return fun;
    }

    public void setFun(String fun) {
        this.fun = fun;
    }

    public String getItemStatus() {
        return itemStatus;
    }

    public void setItemStatus(String itemStatus) {
        this.itemStatus = itemStatus;
    }

    public Item getItem() {
        return item;
    }

    public void setItem(Item item) {
        this.item = item;
    }
}
